package com.paireach.bw.activity;

import android.os.Build;
import android.os.Bundle;
import android.transition.Transition;
import android.transition.TransitionInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.paireach.bw.R;
import com.paireach.bw.base.BaseActivity;

/**
 * Title: FeedBackActivity
 * Description: 个人中心里的意见反馈页面
 * company: 上海双至
 *
 * @author Shawn
 * @date 2015年12月4日 上午10:39:37
 */
public class FeedBackActivity extends BaseActivity implements OnClickListener {

    private ImageView layout_top_back;
    private TextView layout_top_change;
    private Button feedback_bt_submit;
    private EditText feedback_et_content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= 21) {
            getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
            Transition slide_bottom = TransitionInflater.from(this).inflateTransition(android.R.transition.slide_bottom);
            getWindow().setEnterTransition(slide_bottom);
        }

        setContentView(R.layout.activity_feed_back);
        initView();
        mListener();
    }

    private void mListener() {
        layout_top_back.setOnClickListener(this);
        feedback_bt_submit.setOnClickListener(this);
    }

    private void initView() {
        layout_top_back = (ImageView) findViewById(R.id.layout_top_back);
        layout_top_change = (TextView) findViewById(R.id.layout_top_change);
        layout_top_change.setText("意见反馈");
        feedback_bt_submit = (Button) findViewById(R.id.feedback_bt_submit);
        feedback_et_content = (EditText) findViewById(R.id.feedback_et_content);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.layout_top_back:
//                FeedBackActivity.this.finish();
                onBackPressed();
                break;
            case R.id.feedback_bt_submit:
                //TODO 点击提交按钮需要做的事情
//                FeedBackActivity.this.finish();
                onBackPressed();
                break;
            default:
                break;
        }
    }
}
